<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //Math函数,和c语言一样
        // var number=9;
        // // var result=Math.sqrt(number)
        // // console.log(result)
        // //1-10的随机整数
        // var result=Math.floor(Math.random()*10+1);
        // console.log(result);
        // // 日期Date
        // console.log(new Date);
        setInterval(function() {
            var a = new Date;
            var hours = a.getHours();
            console.log(hours);
        }, 1000)

    </script>
</body>
</html>